#include <iostream>
#include <string>
#include <unistd.h>
#include <signal.h>
using namespace std;
int main(){
    SIG_IGN
    int n = alarm(5);
    cout << n << endl;
    signal(SIGALRM, [](int){
        std::cout << "alarm" << std::endl;
    });
    while (1){}
    return 0;
}